﻿/*---------------------------------------------------------------------*/
// fileName="ThreadPackCommon.cs" CompanyName="SureKAM"
// Copyright SureKAM (c). All right reserved.
/*---------------------------------------------------------------------*/

namespace SureKAM.BackUp.Notify.Common
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    public class ThreadPackCommon
    {
        #region 私有字段

        private FileWatchCommon fileWatchCommon;
        private Domain.Directory directory;

        #endregion

        #region 构造
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="fileWatchCommon">监控类</param>
        /// <param name="directory">目录信息</param>
        public ThreadPackCommon(Domain.Directory directory)
        {
            this.fileWatchCommon = new FileWatchCommon(directory);
            this.directory = directory;
        }
        #endregion

        #region 属性
        public FileWatchCommon FileWacth
        {
            get { return this.fileWatchCommon; }
        }

        public Domain.Directory Direct
        {
            get { return this.directory; }
        }
        #endregion

        #region 公有方法
        /// <summary>
        /// 开始
        /// </summary>
        public void Start()
        {
            this.fileWatchCommon.Monitoring();
        }

        /// <summary>
        /// 停止
        /// </summary>
        public void Stop()
        {
            this.fileWatchCommon.ShortMonit();
        }
        #endregion
    }
}
